package com.nice.demo;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.nice.demo.test.DrawType;
import com.nice.demo.test.MyHandWritingView;

/**
 * auth: yyj
 * time: 2018/7/5
 */

public class MyAdapter extends BaseAdapter {
    private Context mContext;

    public MyAdapter(Context context) {
        mContext = context;
    }

    @Override
    public int getCount() {
        return 20;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = View.inflate(mContext, R.layout.lv_item, null);
        MyHandWritingView handWritingView = (MyHandWritingView) view.findViewById(R.id.hand_writing_view);
        handWritingView.setDrawType(DrawType.RECTANGLE);
        return view;
    }
}
